package com.example.auth.dto;

import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * login params
 *
 * @author cui haida
 * @version JDK 8
 * 2025/8/4
 */
@Data
public class LoginDTO {
    /*
     * username
     */
    @NotNull(message = "user name is null")
    @NotEmpty(message = "user name is empty")
    private String username;
    /*
     * password
     */
    @NotNull(message = "password is null")
    @NotEmpty(message = "password is empty")
    private String password;
    /*
     * phone number
     */
    @NotNull(message = "phone number is null")
    @NotEmpty(message = "phone number is empty")
    @Size(min = 11, max = 11, message = "phone number length must be 11")
    private String phone;

    /*
     * the captcha key
     */
    @NotNull(message = "captcha key is null")
    @NotEmpty(message = "captcha key is empty")
    private String captchaKey;
    /*
     * the captcha code
     */
    @NotNull(message = "captcha code is null")
    @NotEmpty(message = "captcha code is empty")
    private String captchaCode;
    /*
     * the sms code
     */
    @NotNull(message = "sms code is null")
    @NotEmpty(message = "sms code is empty")
    @Size(min = 6, max = 6, message = "sms code length must be 6")
    private String smsCode;
}